QÅFÇ«ÇÃÇÊǧDžÇ∑ÇÍÇŒÅAMac OS X ÇÃìdéqÉÅÅ[ÉãÉvÉçÉOÉâÉÄÇ…ìYïtèëófiïtÇ´ÇÃìdéqÉÅÅ[ÉãÇëóêMÇ∑ÇÈÇÊǧDžóvãÅÇ∑ÇÈ AppleScript ÇèëÇØÇÈÇ≈ǵÇÂǧǩÅB
AÅFMac OS X ÇÃìdéqÉÅÅ[ÉãÉvÉçÉOÉâÉÄÇÕ AppleScript Ç…ëŒâûǵǃǢNjÇ∑ÅBÉäÉXÉg 1 Ç…é¶Ç∑ÉXÉNÉäÉvÉgó·Ç≈ÇÕÅAÉÜÅ[ÉUÇ™ÅAëóêMÉÅÉbÉZÅ[ÉWÇ…ìYïtÇ∑ÇÈÉeÉLÉXÉgÉtÉ@ÉCÉãÇëIëÇ≈Ç´ÇÈÇÊǧDžǵǃǢNjÇ∑ÅB
tell application "Mail"
(* ìdéqÉÅÅ[ÉãÉAÉvÉäÉPÅ[ÉVÉáÉìÇÃÉoÅ[ÉWÉáÉì *)
set mailversion to version as string
(* ï\é¶Ç‹ÇΩÇÕëóêMÇÃèàóùÇéwíË - displayForManualSend
Ç™ true Ç»ÇÁÇŒÅAÉÜÅ[ÉUÇ™ëóêMÇ≈Ç´ÇÈÇÊǧDžÅAÉÅÉbÉZÅ[ÉWÇ™
ê∂ê¨Ç≥ÇÍÅAÉEÉBÉìÉhÉEÇ…ï\é¶Ç≥ÇÍÇ‹Ç∑ÅBfalse ÇÃèÍçáÅA
ÉÅÉbÉZÅ[ÉWÇÕÇ∑ÇÆÇ…ëóÇÁÇÍÇ‹Ç∑ *)
set displayForManualSend to true
(* ÉÅÉbÉZÅ[ÉWÇÃàÍî ìIÇ»óvëfÇéwíË *)
set bodyvar to return & return & "Test body."
set addrVar to "bogus@apple.com"
set addrNameVar to "Guinea Pig"
(* ìYïtèëófiÇéwíË *)
(* DZÇÃÉtÉ@ÉCÉãÉäÉXÉgÇÕǪÇÃëºÇÃê›íËÇé¶Ç∑ *)
(* ìdéqÉÅÅ[ÉãÇëóêMÇ∑ÇÈÇΩÇflÇÃÉXÉNÉäÉvÉgéËèá *)
(* íçà”ÅFmailto å`éÆÇà URL Ç≈ÇÕìYïtèëófiÇà *)
(* éwíËÇ™Ç≈ǴǻǢ *)
set fileAttachThis to choose file of type "TEXT"
set fileList to {fileAttachThis}
(* åèñºÇíËã` *)
set subjectvar to "Test Message From AppleScript with Attachment!"
(* ÉÅÉbÉZÅ[ÉWÇçÏê¨ *)
set composeMessage to (a reference to (make new compose message ¬
at beginning of compose messages))
tell composeMessage
make new to recipient at beginning of to recipients ¬
with properties {address:addrVar, display name:addrNameVar}
set the subject to subjectvar
set the content to bodyvar
tell content
repeat with aFile in fileList
make new text attachment ¬
with properties {file name:aFile} ¬
at before the first word of the ¬
first paragraph
end repeat
end tell
end tell
(* ÉÅÉbÉZÅ[ÉWÇëóêMÇ‹ÇΩÇÕï\é¶ *)
if displayForManualSend then
set messageEditor to make new message editor ¬
at beginning of message editors
(* éüÇ…ÅAìdéqÉÅÅ[ÉãÉAÉvÉäÉPÅ[ÉVÉáÉìÇÃÉoÅ[ÉWÉáÉì
1.0 ÇΔ 1.1. Ç…ÇÕdžÇÈÇ™à»ç~ÇÃÉoÅ[ÉWÉáÉìÇ≈èCê≥Ç≥ÇÍÇΩÉoÉOÇÃ
âÒîï˚ñ@Çé¶Ç∑ *)
if mailversion is "1.0" or mailversion is "1.1" then
set compose message of last message editor to composeMessage
else
set compose message of first message editor to composeMessage
end if
else
send composeMessage
end if
end tell
|
|
ÉäÉXÉg 1Å@ìYïtèëófiïtÇ´ÇÃìdéqÉÅÅ[ÉãÇëóêMÇ∑ÇÈ AppleScript
|
[2002 îN 1 åé 4 ì˙]
|